﻿using System;
using System.Collections.Generic;

using System.Text;
using System.Data;

namespace HZ.Supervise.IBLL
{
    /// <summary>
    /// 医院处方单
    /// </summary>
    public interface IBLL_Prescription
    {
        /// <summary>
        /// 获取未补助的医院情况
        /// </summary>
        /// <param name="stwhere">查询条件</param>
        /// <param name="currentPage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        DataTable GetHospitaleNoPrescrip(string stwhere, int currentPage, int pagesize, out int totalRecord);
        DataTable GetHospitaleTB_PrescriptionDetail(string stwhere, int currentPage, int pagesize, out int totalRecord);
        DataTable GetHospitaleNoPrescrip1(string stwhere);
        /// <summary>
        ///获取Prescrip信息
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="currentPage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
       IList<HZ.Supervise.Model.Subsidy> GetSubsidyTable(object obj, int currentPage, int pagesize, out int totalRecord);
        /// <summary>
        /// 根据条件查询出可补贴的处方单
        /// </summary>
        /// <returns></returns>
        DataTable GetHospitaleTB_Prescription(string where);
         /// <summary>
        /// 根据条件查询结算单
        /// </summary>
        /// <param name="stwhere"></param>
        /// <param name="currentPage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        DataTable GetAll(string stwhere, int currentPage, int pagesize, out int totalRecord);
        /// <summary>
        /// 更新基药补贴
        /// </summary>
        /// <param name="sql"></param>
        /// <returns></returns>
        int UpdtePEssentialDrugsAmount(string sql);
        /// <summary>
        /// 获取补贴情况
        /// </summary>
        /// <param name="stwhere"></param>
        /// <param name="currentPage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        DataTable GetSubsidy(string stwhere, int currentPage, int pagesize, out int totalRecord);
        DataTable GetSubsidyInfo(string stwhere, int currentPage, int pagesize, out int totalRecord);
        /// <summary>
        /// 获取补贴处方单
        /// </summary>
        /// <param name="stwhere"></param>
        /// <param name="currentPage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        DataTable GetHospitalePrescripdeail(string stwhere, int currentPage, int pagesize, out int totalRecord);
        DataTable GetHospitalePrescrioDetail2(string stwhere, int currentPage, int pagesize, out int totalRecord);
        //显示明细
        DataTable GetHospitalePrescrioDetail2(string stwhere);

        /// <summary>
        /// 获取提交数据表
        /// </summary>
        /// <param name="stwhere"></param>
        /// <param name="currentPage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        DataTable GetSubmitData(string stwhere);
        DataTable GetHospitaleSubsidyDetail(string stwhere, int currentPage, int pagesize, out int totalRecord);
        /// <summary>
        /// 更新提交数据状态
        /// </summary>
        /// <param name="stupdate1">更新为1的ID</param>
        /// <param name="strupdate0">更新为 0 的ID</param>
        /// <returns></returns>
        int UpdateSubmitDataControlID(string stupdate1, string strupdate0, string struserid);
        /// <summary>
        /// 补助报表
        /// </summary>
        /// <param name="sqlwhere"></param>
        /// <param name="sqlgroup"></param>
        /// <param name="tpye">0:医院已确认补助,1:已补助</param>
        /// <returns></returns>
        DataTable GetSubsidyStatistics(string sqlwhere);
        /// <summary>
        /// 批量更新Subsidy
        /// </summary>
        /// <param name="SubsidyList"></param>
        /// <returns></returns>
        int UpdateSubsidyStateBacth(IList<HZ.Supervise.Model.Subsidy> SubsidyList);
        /// <summary>
        ///获取SubsidyDetail信息
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="currentPage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        IList<HZ.Supervise.Model.SubsidyDetail> GetSubsidyDetailTable(object obj, int currentPage, int pagesize, out int totalRecord);
        /// <summary>
        /// 批量删除SubsidyDetail
        /// </summary>
        /// <param name="SubsidyList"></param>
        /// <returns></returns>
        int DeleteSubsidyDetailBacth(IList<HZ.Supervise.Model.SubsidyDetail> SubsidyDetailList);
        /// <summary>
        /// 批量删除Subsidy
        /// </summary>
        /// <param name="SubsidyList"></param>
        /// <returns></returns>
        int DeleteSubsidyBacth(IList<HZ.Supervise.Model.Subsidy> SubsidyList);
        /// <summary>
        /// 批量更新SubsidyDetail
        /// </summary>
        /// <param name="SubsidyDetailList"></param>
        /// <returns></returns>
        int UpdateSubsidyDetailBacth(IList<HZ.Supervise.Model.SubsidyDetail> SubsidyDetailList);
        /// <summary>
        /// 获取GetSubsidyList
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="currentPage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        IList<HZ.Supervise.Model.Subsidy> GetSubsidyList(object obj, int currentPage, int pagesize, out int totalRecord);
        /// <summary>
        /// 向Subsidy表里添加SubsidyDetail
        /// </summary>
        /// <param name="SubsidyDetailList"></param>
        /// <returns></returns>
        int AddSubsidyDetailToSubsidy(IList<HZ.Supervise.Model.SubsidyDetail> SubsidyDetailList);
          /// <summary>
        /// 更新或插入结算单或处方单明细
        /// </summary>
        /// <param name="subsidy">结算单</param>
        /// <param name="prescriotionList">处方单集合</param>
        /// <param name="i">参数若为0时添加结算单，若为其他时更新结算单</param>
        /// <returns></returns>
        int UpdateAll(Model.Subsidy subsidy, IList<Model.Prescription> prescriotionList, int i);
    }
}
